﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using Xyz.BusinessObjects;
using Xyz.DataObjects;
using Xyz.DataObjects.Interfaces;
using Xyz.Service.DataTransferObjects;
using Xyz.Service.ServiceContracts;

namespace Xyz.Service
{
  
    /// <summary>
    /// This service will handle all methods for Addon Services
    /// </summary>
    /// 
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
    public class AddonService : IAddonService
    {
        private static readonly IServiceCategoryDao ServiceCategoryDao = DataAccess.ServiceCategoryDao;
        private static readonly IServiceDao ServiceDao = DataAccess.ServiceDao;
        /*
        public List<ServiceCategoryDTO> GetServiceCategories()
        {
            return Mapper.ToDto(ServiceCategoryDao.GetServiceCategories());
        }
        */
        public List<ServiceDTO> GetServices()
        {
            return Mapper.ToDto(ServiceDao.GetAllServices());
        }

        public List<ServiceDTO> GetAllServicesByServiceCategoryCode(string serviceCategoryCode)
        {
            return Mapper.ToDto(ServiceDao.GetAllServicesByServiceCategoryCode(serviceCategoryCode));

        }

        public ServiceDTO GetServiceByServiceCode(string serviceCode)
        {
            return Mapper.ToDto(ServiceDao.GetServiceByServiceCode(serviceCode));

        }

    }  
}
